import CommonModal from '@/components/CommonModal';
import CommonLoading from '@/components/CommonLoading';
import { useState, useEffect } from 'react';
import { Alert } from 'antd';
import { CommonForm } from '@/pages/OrderModule/common/components/CommonForm';
import CommonInput from "@/pages/OrderModule/common/components/CommonInput";
import { addQuickSearchOp } from '@/pages/OrderModule/common/hooks/useConfig/services';


export default ({ nums, handleOk, handleCancel }) => {

  const [visible, setVisible] = useState(false);

  useEffect(() => {
    setVisible(true);
  }, [])

  const renderMessage = () => {
    return (<div>
      <p>当前勾选了<span className='common-color2'> {nums} </span>个仓库的订单</p>
      <p>不同仓库订单同时打印，则订单会按不同仓库分类分开打，同时记录<span className='common-color9'>不同打印批次</span>。</p>
    </div>)
  }

  return (<>
    <CommonModal
      title='打印提示'
      visible={visible}
      onOk={handleOk}
      onCancel={() => setVisible(false)}
      afterClose={handleCancel}
      minHeight={80}
    >
     <Alert message={renderMessage()} />
     <br />
     <h3>请确认是否需要一起打印？</h3>
     <br />
    </CommonModal>
  </>)
}